<?php 
    include("includes/connect_db.php");

    $host = $_POST['host'];

    $sql_lihat_host = "SELECT * FROM tb_host WHERE id_host = '$host'";
    $query_lihat_host = mysql_query($sql_lihat_host);
    $lihat_host = mysql_fetch_array($query_lihat_host);
    
    $koneksiBaru = mysql_connect($lihat_host['host'], $lihat_host['username'], $lihat_host['password']) or die("Connection Error: " . mysql_error());

    mysql_select_db($lihat_host['db'], $koneksiBaru) or die("Error conecting to db.");
?>

<div>
    <div class="rincianTabel">
        <?php
            $rincianTabel = explode(',', $tabel);
            $jum = count($rincianTabel);
            foreach ($rincianTabel as $parTabel) {
        ?>
            <button class="btn btn-info parTabel" data-id="<?php echo $parTabel; ?>"><?php echo $parTabel; ?></button>
        <?php
            }
        ?>
    </div>
    
    <div class="rincianParameter" style="display: none;">
    </div>
</div>
<div class="footer">
    <button class="btn btn-info btnParameter" name="keluar">
        <i class="icon-white icon-ok"></i>
        Simpan
    </button>
</div>
